import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @ClassName L2B
 * @Description
 * @Author Jingxiao.Ye
 * @Date 2021/12/5 下午11:31
 * @Version V1.0
 * @Since JDK 11
 */
public class L2B {

    public static void main(String[] args) {
        //使用注解也可以使用@Component
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(BeanConfig.class);
        TestBean bean = applicationContext.getBean(TestBean.class);
        bean.test();
    }
}
